home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / ANGLES.dxr / 00071.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  606 b   |  21 lines

  1. on enterFrame
  2.   set the constraint of sprite 8 to 4
  3.   set the cursor of sprite 4 to 0
  4.   set the cursor of sprite 8 to [321, 322]
  5.   puppetSprite(5, 1)
  6.   if the locV of sprite 8 > the locV of sprite 3 then
  7.     set the type of sprite 5 to 5
  8.     set x to -1
  9.   else
  10.     set the type of sprite 5 to 6
  11.     set x to 1
  12.   end if
  13.   spriteBox(5, the left of sprite 5, the locV of sprite 3, the locH of sprite 8, the locV of sprite 8)
  14.   set the floatPrecision to 1
  15.   put x * float(atan(float(the height of sprite 5) / float(the width of sprite 5))) * 180.0 / PI into field "Slide"
  16. end
  17.  
  18. on exitFrame
  19.   go(the frame)
  20. end
  21.